package com.jxin.mall.config.properties;

import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;
import java.time.Duration;

/**
 * redis缓存参数类
 * @author 蔡佳新
 * @version 1.0
 * @since jdk 1.8
 */
@Data
@Validated
public class CacheConfigProperties {
    @NotNull(message = "超时时间ttl必须配置")
    private Duration expiration;
    /**config一样的默认值*/
    private boolean allowNullValues = true;
    /**config一样的默认值*/
    private boolean isUseKeyPrefix = true;

    private String prefixKeys;
}
